package com.su.test;

/**
 * @author Li
 * @Date 2023/4/7 15:10
 */
public class SumEven {
    public static void main(String[] args) {
        /**
         * 求数组元素偶数和
         */
        int ar[]={2,1,4,5,8,12,11,16,7};
        int sum=0;
        for (int i = 0;i<ar.length;i++){
            if (ar[i]%2==0){
                sum+=ar[i];
            }
        }
        System.out.println(sum);
    }
}
